#!/bin/bash

# this makes the times in the mosquitto log
# human-readable

tail -f /var/log/mosquitto/mosquitto.log | \
   awk '
      { 
         sub(":","",$1)
         cmd = "date -d @" $1 " +%H:%M"
         cmd | getline d
         sub($1,d,$0)
         print $0
      }'
